<?php /* Smarty version 2.6.26, created on 2011-01-25 11:40:45
         compiled from CRM/Activity/Selector/Activity.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('block', 'ts', 'CRM/Activity/Selector/Activity.tpl', 30, false),array('function', 'crmURL', 'CRM/Activity/Selector/Activity.tpl', 34, false),array('function', 'counter', 'CRM/Activity/Selector/Activity.tpl', 52, false),array('function', 'cycle', 'CRM/Activity/Selector/Activity.tpl', 54, false),array('modifier', 'crmDate', 'CRM/Activity/Selector/Activity.tpl', 101, false),array('modifier', 'replace', 'CRM/Activity/Selector/Activity.tpl', 103, false),)), $this); ?>

<div>
  <?php if (! $this->_tpl_vars['noFieldSet']): ?>	
  <h3 class="crm-table-title"><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Activities<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></h3>
  <?php endif; ?>
<?php if ($this->_tpl_vars['rows']): ?>
  <span id='fileOnCaseStatusMsg' style="display:none;"></span>
  <form title="activity_pager" action="<?php echo CRM_Utils_System::crmURL(array(), $this);?>
" method="post">
  <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/pager.tpl", 'smarty_include_vars' => array('location' => 'top')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

  <?php echo '<table class="selector"><tr class="columnheader">'; ?><?php $_from = $this->_tpl_vars['columnHeaders']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['header']):
?><?php echo '<th scope="col">'; ?><?php if ($this->_tpl_vars['header']['sort']): ?><?php echo ''; ?><?php $this->assign('key', $this->_tpl_vars['header']['sort']); ?><?php echo ''; ?><?php echo $this->_tpl_vars['sort']->_response[$this->_tpl_vars['key']]['link']; ?><?php echo ''; ?><?php else: ?><?php echo ''; ?><?php echo $this->_tpl_vars['header']['name']; ?><?php echo ''; ?><?php endif; ?><?php echo '</th>'; ?><?php endforeach; endif; unset($_from); ?><?php echo '</tr>'; ?><?php echo smarty_function_counter(array('start' => 0,'skip' => 1,'print' => false), $this);?><?php echo ''; ?><?php $_from = $this->_tpl_vars['rows']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['row']):
?><?php echo '<tr class="'; ?><?php echo smarty_function_cycle(array('values' => "odd-row,even-row"), $this);?><?php echo ' '; ?><?php echo $this->_tpl_vars['row']['class']; ?><?php echo ' crm-activity crm-activity_status-'; ?><?php echo $this->_tpl_vars['row']['activity_status_id']; ?><?php echo ' crm-activity-type_'; ?><?php echo $this->_tpl_vars['row']['activity_type_id']; ?><?php echo '" id="crm-activity_'; ?><?php echo $this->_tpl_vars['row']['activity_id']; ?><?php echo '"><td class="crm-activity-type crm-activity-type_'; ?><?php echo $this->_tpl_vars['row']['activity_type_id']; ?><?php echo '">'; ?><?php echo $this->_tpl_vars['row']['activity_type']; ?><?php echo '</td><td class="crm-activity-subject">'; ?><?php echo $this->_tpl_vars['row']['subject']; ?><?php echo '</td><td class="crm-activity-source_contact_name">'; ?><?php if ($this->_tpl_vars['contactId'] == $this->_tpl_vars['row']['source_contact_id']): ?><?php echo ''; ?><?php echo $this->_tpl_vars['row']['source_contact_name']; ?><?php echo ''; ?><?php elseif ($this->_tpl_vars['row']['source_contact_id']): ?><?php echo '<a href="'; ?><?php echo CRM_Utils_System::crmURL(array('p' => 'civicrm/contact/view','q' => "reset=1&cid=".($this->_tpl_vars['row']['source_contact_id'])), $this);?><?php echo '" title="'; ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php echo 'View contact'; ?><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php echo '">'; ?><?php echo $this->_tpl_vars['row']['source_contact_name']; ?><?php echo '</a>'; ?><?php else: ?><?php echo '<em>n/a</em>'; ?><?php endif; ?><?php echo '</td><td class="crm-activity-target_contact_name">'; ?><?php if ($this->_tpl_vars['row']['mailingId']): ?><?php echo '<a href="'; ?><?php echo $this->_tpl_vars['row']['mailingId']; ?><?php echo '" title="'; ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php echo 'View Mailing Report'; ?><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php echo '">'; ?><?php echo $this->_tpl_vars['row']['recipients']; ?><?php echo '</a>'; ?><?php elseif ($this->_tpl_vars['row']['recipients']): ?><?php echo ''; ?><?php echo $this->_tpl_vars['row']['recipients']; ?><?php echo ''; ?><?php elseif (! $this->_tpl_vars['row']['target_contact_name']): ?><?php echo '<em>n/a</em>'; ?><?php elseif ($this->_tpl_vars['row']['target_contact_name']): ?><?php echo ''; ?><?php $this->assign('showTarget', 0); ?><?php echo ''; ?><?php $_from = $this->_tpl_vars['row']['target_contact_name']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['targetID'] => $this->_tpl_vars['targetName']):
?><?php echo ''; ?><?php if ($this->_tpl_vars['showTarget'] < 5): ?><?php echo ''; ?><?php if ($this->_tpl_vars['showTarget']): ?><?php echo ';&nbsp;'; ?><?php endif; ?><?php echo '<a href="'; ?><?php echo CRM_Utils_System::crmURL(array('p' => 'civicrm/contact/view','q' => "reset=1&cid=".($this->_tpl_vars['targetID'])), $this);?><?php echo '" title="'; ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php echo 'View contact'; ?><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php echo '">'; ?><?php echo $this->_tpl_vars['targetName']; ?><?php echo '</a>'; ?><?php $this->assign('showTarget', $this->_tpl_vars['showTarget']+1); ?><?php echo ''; ?><?php endif; ?><?php echo ''; ?><?php endforeach; endif; unset($_from); ?><?php echo ''; ?><?php if (count ( $this->_tpl_vars['row']['target_contact_name'] ) > 5): ?><?php echo ' ('; ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php echo 'more'; ?><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php echo ')'; ?><?php endif; ?><?php echo ''; ?><?php endif; ?><?php echo '</td><td class="crm-activity-assignee_contact_name">'; ?><?php if (! $this->_tpl_vars['row']['assignee_contact_name']): ?><?php echo '<em>n/a</em>'; ?><?php elseif ($this->_tpl_vars['row']['assignee_contact_name']): ?><?php echo ''; ?><?php $this->assign('showAssignee', 0); ?><?php echo ''; ?><?php $_from = $this->_tpl_vars['row']['assignee_contact_name']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['assigneeID'] => $this->_tpl_vars['assigneeName']):
?><?php echo ''; ?><?php if ($this->_tpl_vars['showAssignee'] < 5): ?><?php echo ''; ?><?php if ($this->_tpl_vars['showAssignee']): ?><?php echo ';&nbsp;'; ?><?php endif; ?><?php echo '<a href="'; ?><?php echo CRM_Utils_System::crmURL(array('p' => 'civicrm/contact/view','q' => "reset=1&cid=".($this->_tpl_vars['assigneeID'])), $this);?><?php echo '" title="'; ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php echo 'View contact'; ?><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php echo '">'; ?><?php echo $this->_tpl_vars['assigneeName']; ?><?php echo '</a>'; ?><?php $this->assign('showAssignee', $this->_tpl_vars['showAssignee']+1); ?><?php echo ''; ?><?php endif; ?><?php echo ''; ?><?php endforeach; endif; unset($_from); ?><?php echo ''; ?><?php if (count ( $this->_tpl_vars['row']['assignee_contact_name'] ) > 5): ?><?php echo '('; ?><?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php echo 'more'; ?><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php echo ')'; ?><?php endif; ?><?php echo ''; ?><?php endif; ?><?php echo '</td><td class="crm-activity-date_time">'; ?><?php echo ((is_array($_tmp=$this->_tpl_vars['row']['activity_date_time'])) ? $this->_run_mod_handler('crmDate', true, $_tmp) : smarty_modifier_crmDate($_tmp)); ?><?php echo '</td><td class="crm-activity-status crm-activity-status_'; ?><?php echo $this->_tpl_vars['row']['status_id']; ?><?php echo '">'; ?><?php echo $this->_tpl_vars['row']['status']; ?><?php echo '</td><td>'; ?><?php echo ((is_array($_tmp=$this->_tpl_vars['row']['action'])) ? $this->_run_mod_handler('replace', true, $_tmp, 'xx', $this->_tpl_vars['row']['id']) : smarty_modifier_replace($_tmp, 'xx', $this->_tpl_vars['row']['id'])); ?><?php echo '</td></tr>'; ?><?php endforeach; endif; unset($_from); ?><?php echo '</table>'; ?>


  <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "CRM/common/pager.tpl", 'smarty_include_vars' => array('location' => 'bottom')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  
  <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "CRM/Case/Form/ActivityToCase.tpl", 'smarty_include_vars' => array('contactID' => $this->_tpl_vars['contactId'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  </form>
<?php else: ?>

  <div class="messages status">
    <?php if (isset ( $this->_tpl_vars['caseview'] ) && $this->_tpl_vars['caseview']): ?>
      <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>There are no Activities attached to this case record.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php if ($this->_tpl_vars['permission'] == 'edit'): ?> <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>You can go to the Activities tab to create or attach activity records.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php endif; ?>
    <?php elseif ($this->_tpl_vars['context'] == 'home'): ?>
      <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>There are no Activities to display.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
    <?php else: ?>
      <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>There are no Activites to display.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php if ($this->_tpl_vars['permission'] == 'edit'): ?> <?php $this->_tag_stack[] = array('ts', array()); $_block_repeat=true;smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>You can use the links above to schedule or record an activity.<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php endif; ?>
    <?php endif; ?>
  </div>

<?php endif; ?>
<?php if (! $this->_tpl_vars['noFieldSet']): ?>
<?php endif; ?>
</div>
